home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d3
/
rettig.arc
/
TRSOURCE.EXE
/
_TR_ATLA.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-10-22
|
764b
|
25 lines
/*********
* _TR_ATLAST
* by Leonard Zerman
* Placed in the public domain by Tom Rettig Associates, 10/22/1990.
*
* Syntax: _tr_atlast( <*C>, <*C> )
* Return: The last position of a character found in a string.
* Note : Returns 0 if not found, -1 if error.
********/
#include "trlib.h"
_tr_atlast(c,instr) /* declare the atlast function */
char *instr; /* pointer to the passed string */
char *c; /* pointer to the char to be found */
{
int i;
for (i = _tr_strlen(instr); instr[i] != *c && i >= 0 ; i--)
; /* empty loop checking for condition */
return( ++i );
}
/* eof */